#!/usr/bin/env python

import datetime as dt


def countdown(days=0, hours=0, minutes=0):
    tempo = dt.datetime.now() + dt.timedelta(
        days=days, hours=hours, minutes=minutes)
    tempo = tempo.replace(microsecond=0)
    delta = tempo - dt.datetime.now()
    dtsec = delta.seconds
    hrs = dtsec // 3600
    mts, scs = divmod((dtsec % 3600), 60)
    timefmt = ('{} días, {} horas, {} minutos '
               '{} segundos').format(delta.days,
                                     hrs, mts, scs)
    return timefmt
    # while True:
    #     print(timefmt, end='\r')
    #     time.sleep(1)
    #     dtsec -= 1 """


if __name__ == '__main__':
    print(countdown(5, 12))
